FROM python:3.8-alpine

VOLUME /work
WORKDIR /work
COPY code .
#COPY code/requirements.txt .

# RUN echo -e http://mirrors.ustc.edu.cn/alpine/v3.7/main/ > /etc/apk/repositories && pip3 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

# RUN apk add bash && pip3 install -r requirements.txt -i https://pypi.mirrors.ustc.edu.cn/simple
RUN pip3 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn

EXPOSE 8080
CMD python3 run.py
